package com.hx.mybatisplus.code.base;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @ClassName BaseModel
 * @Description //TODO
 * @Author WHX
 * @Date 2021/12/17 15:57
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseModel<ID, Model> {
    /**
     * 主键id
     */
    private ID id;
    /**
     * 是否删除 0：否 1：是
     */
    private Boolean isDelete;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 修改时间
     */
    private Date updateTime;

    public Model setId(ID id) {
        this.id = id;
        return (Model) this;
    }

    public Model setIsDelete(Boolean isDelete) {
        this.isDelete = isDelete;
        return (Model) this;
    }

    public Model setCreateTime(Date createTime) {
        this.createTime = createTime;
        return (Model) this;
    }

    public Model setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return (Model) this;
    }

}
